USE [master]
GO
/****** Object:  Database [streamboard]    Script Date: 2020/5/12 20:33:51 ******/
CREATE DATABASE [streamboard]
GO
ALTER DATABASE [streamboard] SET COMPATIBILITY_LEVEL = 130
GO
IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))
begin
EXEC [streamboard].[dbo].[sp_fulltext_database] @action = 'enable'
end
GO
ALTER DATABASE [streamboard] SET ANSI_NULL_DEFAULT OFF 
GO
ALTER DATABASE [streamboard] SET ANSI_NULLS OFF 
GO
ALTER DATABASE [streamboard] SET ANSI_PADDING OFF 
GO
ALTER DATABASE [streamboard] SET ANSI_WARNINGS OFF 
GO
ALTER DATABASE [streamboard] SET ARITHABORT OFF 
GO
ALTER DATABASE [streamboard] SET AUTO_CLOSE OFF 
GO
ALTER DATABASE [streamboard] SET AUTO_SHRINK OFF 
GO
ALTER DATABASE [streamboard] SET AUTO_UPDATE_STATISTICS ON 
GO
ALTER DATABASE [streamboard] SET CURSOR_CLOSE_ON_COMMIT OFF 
GO
ALTER DATABASE [streamboard] SET CURSOR_DEFAULT  GLOBAL 
GO
ALTER DATABASE [streamboard] SET CONCAT_NULL_YIELDS_NULL OFF 
GO
ALTER DATABASE [streamboard] SET NUMERIC_ROUNDABORT OFF 
GO
ALTER DATABASE [streamboard] SET QUOTED_IDENTIFIER OFF 
GO
ALTER DATABASE [streamboard] SET RECURSIVE_TRIGGERS OFF 
GO
ALTER DATABASE [streamboard] SET  DISABLE_BROKER 
GO
ALTER DATABASE [streamboard] SET AUTO_UPDATE_STATISTICS_ASYNC OFF 
GO
ALTER DATABASE [streamboard] SET DATE_CORRELATION_OPTIMIZATION OFF 
GO
ALTER DATABASE [streamboard] SET TRUSTWORTHY OFF 
GO
ALTER DATABASE [streamboard] SET ALLOW_SNAPSHOT_ISOLATION OFF 
GO
ALTER DATABASE [streamboard] SET PARAMETERIZATION SIMPLE 
GO
ALTER DATABASE [streamboard] SET READ_COMMITTED_SNAPSHOT OFF 
GO
ALTER DATABASE [streamboard] SET HONOR_BROKER_PRIORITY OFF 
GO
ALTER DATABASE [streamboard] SET RECOVERY FULL 
GO
ALTER DATABASE [streamboard] SET  MULTI_USER 
GO
ALTER DATABASE [streamboard] SET PAGE_VERIFY CHECKSUM  
GO
ALTER DATABASE [streamboard] SET DB_CHAINING OFF 
GO
ALTER DATABASE [streamboard] SET FILESTREAM( NON_TRANSACTED_ACCESS = OFF ) 
GO
ALTER DATABASE [streamboard] SET TARGET_RECOVERY_TIME = 60 SECONDS 
GO
ALTER DATABASE [streamboard] SET DELAYED_DURABILITY = DISABLED 
GO
EXEC sys.sp_db_vardecimal_storage_format N'streamboard', N'ON'
GO
ALTER DATABASE [streamboard] SET QUERY_STORE = OFF
GO
USE [streamboard]
GO
ALTER DATABASE SCOPED CONFIGURATION SET LEGACY_CARDINALITY_ESTIMATION = OFF;
GO
ALTER DATABASE SCOPED CONFIGURATION SET MAXDOP = 0;
GO
ALTER DATABASE SCOPED CONFIGURATION SET PARAMETER_SNIFFING = ON;
GO
ALTER DATABASE SCOPED CONFIGURATION SET QUERY_OPTIMIZER_HOTFIXES = OFF;
GO
USE [streamboard]
GO
/****** Object:  Table [dbo].[Canvas]    Script Date: 2020/5/12 20:33:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Canvas](
	[id] [int] NOT NULL,
	[name] [varchar](255) NOT NULL,
	[create_date] [datetime2](7) NOT NULL,
	[image] [varchar](max) NOT NULL,
	[category] [int] NOT NULL,
	[brief] [varchar](255) NULL,
	[exposure] [int] NULL,
	[owner] [int] NULL,
 CONSTRAINT [PK__Canvas__3213E83FA9A0D83D] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[Canvas_Creator]    Script Date: 2020/5/12 20:33:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Canvas_Creator](
	[id] [int] NOT NULL,
	[canvas] [int] NOT NULL,
	[creator] [int] NOT NULL,
 CONSTRAINT [PK__Canvas_C__3213E83FEC805D2F] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[Catgory]    Script Date: 2020/5/12 20:33:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Catgory](
	[id] [int] NOT NULL,
	[name] [varchar](255) NULL,
	[is_show] [int] NULL,
 CONSTRAINT [PK__Catgory__3213E83F10F1EB1D] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[Journal]    Script Date: 2020/5/12 20:33:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Journal](
	[id] [int] NOT NULL,
	[creator] [int] NOT NULL,
	[content] [varchar](255) NOT NULL,
	[canvas] [int] NULL,
 CONSTRAINT [PK__journal__3213E83FC4A62ED3] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[Room]    Script Date: 2020/5/12 20:33:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Room](
	[num] [varchar](6) NOT NULL,
	[initiator] [int] NOT NULL,
	[start_time] [datetime2](7) NOT NULL,
	[end_time] [datetime2](7) NULL,
	[is_locked] [int] NULL,
	[pre_canvas] [int] NULL,
	[id] [int] IDENTITY(1,1) NOT NULL,
 CONSTRAINT [PK_Room] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[Room_Userlist]    Script Date: 2020/5/12 20:33:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Room_Userlist](
	[id] [int] NOT NULL,
	[room] [int] NOT NULL,
	[user] [int] NOT NULL,
	[joined_time] [datetime2](7) NOT NULL,
	[exit_time] [datetime2](7) NULL,
 CONSTRAINT [PK__Room_Use__3213E83F68F0DD0C] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[User_Action]    Script Date: 2020/5/12 20:33:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[User_Action](
	[id] [int] NOT NULL,
	[journal] [int] NULL,
	[operator] [int] NULL,
	[type] [int] NULL,
	[content] [varchar](255) NULL,
 CONSTRAINT [PK__User_Act__3213E83F7507961D] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[Users]    Script Date: 2020/5/12 20:33:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Users](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[username] [varchar](255) NOT NULL,
	[password] [varchar](255) NOT NULL,
	[email] [varchar](255) NULL,
	[nickname] [varchar](255) NULL,
	[mask] [varchar](255) NULL,
	[avator] [varchar](255) NULL,
 CONSTRAINT [PK__User2__3213E83FAE44F739] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
INSERT [dbo].[Canvas] ([id], [name], [create_date], [image], [category], [brief], [exposure], [owner]) VALUES (0, N'test', CAST(N'2020-05-05T23:47:36.0000000' AS DateTime2), N'upload/canvas/default.png', 0, N'这是一个测试', 0, 1023)
GO
INSERT [dbo].[Catgory] ([id], [name], [is_show]) VALUES (0, N'测试', 1)
GO
INSERT [dbo].[Journal] ([id], [creator], [content], [canvas]) VALUES (0, 2, N'测试日志内容', 0)
GO
SET IDENTITY_INSERT [dbo].[Room] ON 
GO
INSERT [dbo].[Room] ([num], [initiator], [start_time], [end_time], [is_locked], [pre_canvas], [id]) VALUES (N'444777', 2, CAST(N'2020-05-05T22:59:40.7370000' AS DateTime2), NULL, NULL, NULL, 1)
GO
INSERT [dbo].[Room] ([num], [initiator], [start_time], [end_time], [is_locked], [pre_canvas], [id]) VALUES (N'478452', 2, CAST(N'2020-05-05T23:29:39.6740000' AS DateTime2), NULL, NULL, NULL, 2)
GO
INSERT [dbo].[Room] ([num], [initiator], [start_time], [end_time], [is_locked], [pre_canvas], [id]) VALUES (N'456456', 2, CAST(N'2020-05-05T23:33:07.0520000' AS DateTime2), NULL, NULL, NULL, 3)
GO
INSERT [dbo].[Room] ([num], [initiator], [start_time], [end_time], [is_locked], [pre_canvas], [id]) VALUES (N'456783', 2, CAST(N'2020-05-05T23:34:58.1870000' AS DateTime2), NULL, NULL, NULL, 4)
GO
INSERT [dbo].[Room] ([num], [initiator], [start_time], [end_time], [is_locked], [pre_canvas], [id]) VALUES (N'456781', 2, CAST(N'2020-05-05T23:38:37.1330000' AS DateTime2), NULL, NULL, NULL, 5)
GO
INSERT [dbo].[Room] ([num], [initiator], [start_time], [end_time], [is_locked], [pre_canvas], [id]) VALUES (N'123456', 2, CAST(N'2020-05-05T23:42:24.6160000' AS DateTime2), NULL, NULL, NULL, 6)
GO
INSERT [dbo].[Room] ([num], [initiator], [start_time], [end_time], [is_locked], [pre_canvas], [id]) VALUES (N'456789', 2, CAST(N'2020-05-05T23:44:26.2470000' AS DateTime2), CAST(N'2020-05-05T23:44:32.3240000' AS DateTime2), NULL, NULL, 7)
GO
SET IDENTITY_INSERT [dbo].[Room] OFF
GO
INSERT [dbo].[User_Action] ([id], [journal], [operator], [type], [content]) VALUES (0, 0, 2, 1, N'很棒')
GO
SET IDENTITY_INSERT [dbo].[Users] ON 
GO
INSERT [dbo].[Users] ([id], [username], [password], [email], [nickname], [mask], [avator]) VALUES (1, N'test', N'11ce6497386761167a0e475b808c4217', N'test@example.com', NULL, NULL, N'/upload/avatar/2020-05-05_澶村儚.png')
GO
INSERT [dbo].[Users] ([id], [username], [password], [email], [nickname], [mask], [avator]) VALUES (4, N'jianghao69', N'62c8ad0a15d9d1ca38d5dee762a16e01', NULL, N'Test', NULL, N'/upload/avatar/2020-05-05_澶村儚.png')
GO
INSERT [dbo].[Users] ([id], [username], [password], [email], [nickname], [mask], [avator]) VALUES (14, N'2018204701', N'202cb962ac59075b964b07152d234b70', N'123@123.com', NULL, NULL, N'/upload/avatar/2020-05-05_澶村儚.png')
GO
INSERT [dbo].[Users] ([id], [username], [password], [email], [nickname], [mask], [avator]) VALUES (1023, N'iceshadows', N'11ce6497386761167a0e475b808c4217', N'748870940@qq.com', N'冰樱', NULL, N'/upload/avatar/2020-05-06_澶村儚2.png')
GO
SET IDENTITY_INSERT [dbo].[Users] OFF
GO
/****** Object:  Index [IX_Room]    Script Date: 2020/5/12 20:33:51 ******/
ALTER TABLE [dbo].[Room] ADD  CONSTRAINT [IX_Room] UNIQUE NONCLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Canvas] ADD  DEFAULT ('') FOR [brief]
GO
ALTER TABLE [dbo].[Canvas] ADD  DEFAULT ((0)) FOR [exposure]
GO
ALTER TABLE [dbo].[Catgory] ADD  DEFAULT ((0)) FOR [is_show]
GO
ALTER TABLE [dbo].[Room] ADD  DEFAULT ((0)) FOR [is_locked]
GO
ALTER TABLE [dbo].[Room_Userlist] ADD  DEFAULT (NULL) FOR [exit_time]
GO
ALTER TABLE [dbo].[Canvas]  WITH CHECK ADD FOREIGN KEY([owner])
REFERENCES [dbo].[Users] ([id])
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Canvas', @level2type=N'COLUMN',@level2name=N'id'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'作品名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Canvas', @level2type=N'COLUMN',@level2name=N'name'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建日期' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Canvas', @level2type=N'COLUMN',@level2name=N'create_date'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'作品内容' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Canvas', @level2type=N'COLUMN',@level2name=N'image'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'外键，作品所在分类' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Canvas', @level2type=N'COLUMN',@level2name=N'category'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'简介' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Canvas', @level2type=N'COLUMN',@level2name=N'brief'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'曝光量(浏览量)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Canvas', @level2type=N'COLUMN',@level2name=N'exposure'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Canvas_Creator', @level2type=N'COLUMN',@level2name=N'id'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'外键，对应画板id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Canvas_Creator', @level2type=N'COLUMN',@level2name=N'canvas'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'外键，对应作者id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Canvas_Creator', @level2type=N'COLUMN',@level2name=N'creator'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Catgory', @level2type=N'COLUMN',@level2name=N'name'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否展示' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Catgory', @level2type=N'COLUMN',@level2name=N'is_show'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Journal', @level2type=N'COLUMN',@level2name=N'id'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'作者' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Journal', @level2type=N'COLUMN',@level2name=N'creator'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'文字内容(html)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Journal', @level2type=N'COLUMN',@level2name=N'content'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'关联画布' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Journal', @level2type=N'COLUMN',@level2name=N'canvas'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建时数字' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Room', @level2type=N'COLUMN',@level2name=N'num'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'外键，发起人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Room', @level2type=N'COLUMN',@level2name=N'initiator'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Room', @level2type=N'COLUMN',@level2name=N'start_time'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'结束时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Room', @level2type=N'COLUMN',@level2name=N'end_time'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否已上锁' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Room', @level2type=N'COLUMN',@level2name=N'is_locked'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'外键，如果是从原有的画布创建，此字段将保存原有画布id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Room', @level2type=N'COLUMN',@level2name=N'pre_canvas'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'外键，房间id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Room_Userlist', @level2type=N'COLUMN',@level2name=N'room'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'外键，用户' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Room_Userlist', @level2type=N'COLUMN',@level2name=N'user'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'加入时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Room_Userlist', @level2type=N'COLUMN',@level2name=N'joined_time'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'退出时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Room_Userlist', @level2type=N'COLUMN',@level2name=N'exit_time'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'外键,日志id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'User_Action', @level2type=N'COLUMN',@level2name=N'journal'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'操作者id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'User_Action', @level2type=N'COLUMN',@level2name=N'operator'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'操作类型' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'User_Action', @level2type=N'COLUMN',@level2name=N'type'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'内容(type为评论时值为评论内容)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'User_Action', @level2type=N'COLUMN',@level2name=N'content'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Users', @level2type=N'COLUMN',@level2name=N'username'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'密码（MD5）' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Users', @level2type=N'COLUMN',@level2name=N'password'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'电子邮件地址' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Users', @level2type=N'COLUMN',@level2name=N'email'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'昵称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Users', @level2type=N'COLUMN',@level2name=N'nickname'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'mask' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Users', @level2type=N'COLUMN',@level2name=N'mask'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'头像' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Users', @level2type=N'COLUMN',@level2name=N'avator'
GO
USE [master]
GO
ALTER DATABASE [streamboard] SET  READ_WRITE 
GO
